<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "t_forum_comment".
 *
 * @property string $id
 * @property string $topic_id 回复主题
 * @property string $pid 对回复的回复
 * @property string $type 类型(回复/赞/踩)
 * @property string $user_name 用户名
 * @property string $content 内容
 * @property string $token token
 * @property string $status 状态
 * @property string $create_by
 * @property string $create_time
 * @property string $update_by
 * @property string $update_time
 * @property int $del_flag
 * @property string $old_id
 */
class TForumComment extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 't_forum_comment';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id'], 'required'],
            [['content'], 'string'],
            [['create_time', 'update_time'], 'safe'],
            [['del_flag'], 'integer'],
            [['id', 'topic_id', 'pid', 'create_by', 'update_by'], 'string', 'max' => 36],
            [['type', 'token', 'status'], 'string', 'max' => 64],
            [['user_name'], 'string', 'max' => 32],
            [['old_id'], 'string', 'max' => 255],
            [['id'], 'unique'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'topic_id' => 'Topic ID',
            'pid' => 'Pid',
            'type' => 'Type',
            'user_name' => 'User Name',
            'content' => 'Content',
            'token' => 'Token',
            'status' => 'Status',
            'create_by' => 'Create By',
            'create_time' => 'Create Time',
            'update_by' => 'Update By',
            'update_time' => 'Update Time',
            'del_flag' => 'Del Flag',
            'old_id' => 'Old ID',
        ];
    }
}
